import org.junit.Test;

public class test {
    @Test
    public void insertuser(){

    }
    @Test
    public void updateuser(){

    }
    @Test
    private void deleteuser(){
        int[] nums={1,2};
        int[] nums1={3,4};
        System.out.println(findMedianSortedArrays(nums1,nums));
    }
    @Test
    public double findMedianSortedArrays(int[] nums1, int[] nums2) {

        int p1=0;
        int p2=0;
        int n=0;
        double[] arry=new double[nums1.length+nums2.length];
        while(p1<nums1.length||p2<nums2.length){
            if(p1==nums1.length){
                arry[n]=nums2[p2];
                p2++;
            }
            if(p2==nums2.length){
                arry[n]=nums1[p1];
                p1++;
            }
            if(p1<nums1.length&&p2<nums2.length){
                if(nums1[p1]<nums2[p2]){
                    arry[n]=nums1[p1];
                    p1++;
                }else{
                    arry[n]=nums2[p2];
                    p2++;
                }
            }

            System.out.println(n);
            n++;

        }
        int a=arry.length/2;
        if(arry.length%2==1){
            return arry[a];
        }else{
            return (arry[a]+arry[a-1])/2;
        }
    }
}
